home *** CD-ROM | disk | FTP | other *** search
- 10 'This short program solves the problem of call waiting interrupting
- 20 'a communications session. Just run this before your communcations
- 21 ' program. It remains in effect until you reset your Hayes Smartmodem
- 22 '
- 30 COLOR 15,9
- 31 CLS:LOCATE 12,18
- 32 PRINT CHR$(7);"Setting Hayes Smartmodem 1200 for Call Waiting"
- 35 OUT 1020,4:GOSUB 110:OUT 1020,3:GOSUB 110
- 40 OPEN "COM1:1200,N,8" AS #1:GOSUB 110
- 50 MSG$="ATS10=100"+CHR$(13):GOSUB 100:GOSUB 110
- 70 CLOSE
- 71 LOCATE 12,1:PRINT SPACE$(80)
- 72 LOCATE 12,22:PRINT CHR$(7);"Now Executing ASCOM IV -- Please Wait"
- 80 SYSTEM
- 100 FOR X=1 TO LEN(MSG$):PRINT #1,MID$(MSG$,X,1);:NEXT
- 110 FOR X=1 TO 1500:NEXT
- 120 RETURN
- 125 '
- 130 ' Line 35: Port 1020 (3FC) is the MCR (Modem Control Register). The
- 131 ' bits are described on page 6-9 of the Hayes Smartmodem
- 132 ' 1200 manual. First CALLWAIT sends a 4, which enables the
- 133 ' interrupt line drivers, and allows the UART to interrupt
- 134 ' the controller. If there are any problems with the serial
- 135 ' port, this command should generate some kind of error.
- 136 ' OUT 1020,3 will reset the modem and is equivalent to
- 137 ' power off/power on. This must be held for at least 50 ms.
- 138 ' This is done using the timing loop at line 110.
- 139 '
- 140 ' Line 40: Open the COM1 port for 1200 baud, no parity and 8 bit words
- 141 ' using buffer #1.
- 142 '
- 143 ' Line 50: Sends a command to the modem. The AT is the ATtention code,
- 144 ' which must precede all modem commands. The S10=100 is
- 145 ' described on page 6-7 of the manual. It allows the carrier
- 146 ' signal to momentarily disappear. The S10=100 sets the time
- 147 ' interval for which the carrier may be lost. This interval
- 148 ' is adjustable in tenths of a second.
-